package me.zk.practice1.thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

public class ThreadPoolExceptionDemo {
    public static void main(String[] args) {
        ExecutorService executorService = Executors.newScheduledThreadPool(15);
        for (int i = 0; i < 10; i++) {
            executorService.submit(()->{
                try {
                    TimeUnit.SECONDS.sleep(3);
                    System.out.println("end...");
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            });
        }
        executorService.shutdown();
    }
}
